package cn.edu.nhic.dao;

import cn.edu.nhic.entity.User;

/**
 * @Description
 * @Date 2024/9/14 15:14
 * @Created by dwp
 */
public class UserDao {
    private UserDao(){
    }

    private static UserDao userDao;
    static {
        userDao = new UserDao();
    }

    public boolean selectUser(User user) {
        // todo 实际上，这里需要先查session， 然后去查数据库，
        return "admin".equals(user.getUserName()) && "admin".equals(user.getPassword());
    }

    public boolean insertUserDao(User user) {
        // todo: 对数据库进行数据写入
        return true;
    }

    public static UserDao getUserDao() {
        return userDao;
    }

}
